package com.spogher.bsc.pages;

import org.apache.wicket.markup.html.IHeaderContributor;
import org.apache.wicket.markup.html.IHeaderResponse;
import org.apache.wicket.markup.html.WebPage;

import com.spogher.bsc.BscSession;
import com.spogher.bsc.pages.ressources.CssResources;
import com.spogher.bsc.pages.ressources.JsResources;
import com.spogher.bsc.panels.AdminMenuPanel;
import com.spogher.bsc.panels.SignInPanel;
import com.spogher.bsc.panels.StatsMenuPanel;

public abstract class BscTemplatePage extends WebPage implements IHeaderContributor{
	
	public BscTemplatePage() {	
		add(new SignInPanel("signInPanel"));
        add(new StatsMenuPanel("statsMenuPanel"));
        add(new AdminMenuPanel("adminMenuPanel").setVisible(BscSession.get().isAuthenticated()));
	}

	public void renderHead(IHeaderResponse response) {
		response.renderCSSReference(CssResources.GLOBAL_CSS);
		response.renderCSSReference(CssResources.JQUERY_UI_CSS_URL);
		response.renderCSSReference(CssResources.JQUERY_UI_CUSTOM_CSS);
		response.renderJavascriptReference(JsResources.JQUERY_MIN_JS);
		response.renderJavascriptReference(JsResources.JQUERY_UI_CUSTOM_MIN_JS);
		
	}
	
	
	
}
